<template>
    <base-dialog  v-bind="$attrs" v-on="$listeners" :title="title" size="mini" @submit="toAdd" :disabled="disabled">
        <el-form  ref="elForm" label-width="100px" :model="formData" :rules="rules" :disabled="disabled">
            <el-form-item label="栏目名称" prop="name">
                <el-input v-model="formData.name"></el-input>
            </el-form-item>
            <el-form-item label="排序">
                <el-input-number v-model="formData.no_order"></el-input-number>
            </el-form-item>
            <el-form-item label="状态" prop="status">
                <el-radio-group v-model="formData.status">
                    <el-radio :label="true">启用</el-radio>
                    <el-radio :label="false">禁用</el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="显示终端 " prop="client">
                <el-radio-group v-model="formData.client">
                    <el-radio :label="0">PC</el-radio>
                    <el-radio :label="1">手机</el-radio>
                </el-radio-group>
            </el-form-item>
        </el-form>
    </base-dialog>
</template>
<script>
    import BaseDialog from "@/components/Common/BaseDialog";
    import DetailDialog from "@/mixins/DetailDialog";
    export default {
        name:"DetailDialog",
        mixins:[DetailDialog],
        props:["parentList"],
        data(){
          return {
              formData:{
                  name:"",
                  no_order:0,
                  status:true,
                  client:0
              },
              rules:{
                  name: [
                      { required: true, message: "名称不能为空", trigger: "blur" }
                  ],
              },
              userList:[]
          }
        },
        created() {
        },
        components: { BaseDialog},
        computed:{
            title() {
                return this.disabled?'查看':this.formData.id?"编辑":"新增"
            },
        },
        methods:{

        }
    }
</script>
